package org.jeecg.modules.fw.mapper;

import java.util.Date;
import java.util.List;

import cn.hutool.core.date.DateTime;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.fw.entity.FwRoomRepair;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.fw.vo.FwRoomRepairVo;

/**
 * @Description: fw_room_repair
 * @Author: jeecg-boot
 * @Date:   2023-04-17
 * @Version: V1.0
 */
public interface FwRoomRepairMapper extends BaseMapper<FwRoomRepair> {

    @Select("select frr.*,cr.layout_id,crl.name as layout_name,cr.name as room_name from fw_room_repair frr " +
            "inner join ces_rooms cr on cr.id = frr.room_id " +
            "inner join ces_room_layout crl on crl.id = cr.layout_id " +
            " where frr.end_date > #{date};")
    List<FwRoomRepairVo> detailList(Date date);
}
